$OpenBSD: patch-testcode_testreader_cpp,v 1.1 2013/12/24 13:57:18 sthen Exp $
--- testcode/testreader.cpp.orig	Sun Jun 23 20:45:16 2013
+++ testcode/testreader.cpp	Sat Dec 21 15:58:18 2013
@@ -130,7 +130,9 @@ HRESULT CTestReader::Test2()
         Chk(TestFixedReadSizes(chunksize));
     }
 
+#ifndef HAVE_ARC4RANDOM
     srand(888);
+#endif
     for (size_t i = 0; i < 200; i++)
     {
         Chk(TestFixedReadSizes(0));
@@ -158,7 +160,11 @@ HRESULT CTestReader::TestFixedReadSizes(size_t chunksi
         
         if (fRandomChunkSizing)
         {
+#ifdef HAVE_ARC4RANDOM
+            chunksize = arc4random_uniform(17) + 1;
+#else
             chunksize = (rand() % 17) + 1;
+#endif
         }
         
         remaining = msgSize - bytesread;
